<?php
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');  //规定不对页面进行缓存
header('Connection: keep-alive');

$time = date('r');

//输出发送日期（始终以 "data: " 开头）
echo "data: The server time is: $time\n\n";

//向网页刷新输出数据
flush();
?>


<!--  -->